HVM: sanitize DOMCTL_gethvmcontext_partial handling
authorJan Beulich <jbeulich@suse.com>
Wed, 14 Jun 2017 09:38:32 +0000 (11:38 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 14 Jun 2017 09:38:32 +0000 (11:38 +0200)
commit38d42c5ecf794a391ea6933b9a93e2fd6ffdfcbe
tree5cb098b65515cf96dd0ba3e5ba670486728b2dce
parent6391b221139348f35432a592b94c2d624770f674
HVM: sanitize DOMCTL_gethvmcontext_partial handling

Have the caller indicate its buffer size, provide a means to query the
needed size, don't ignore the upper halves of type code and instance,
and don't copy partial data.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libxc/xc_domain.c
xen/arch/x86/domctl.c
xen/common/hvm/save.c
xen/include/public/domctl.h
xen/include/xen/hvm/save.h